package com.clps.designPatterns.chapter02.线程安全问题;

public class Singleton01 {
    private  static Singleton01 singleton01 = null;

    public Singleton01() {
    }

    public static synchronized Singleton01 getInstance(){
        if(singleton01 == null){
            singleton01 = new Singleton01();
        }
        return  singleton01;
    }
}
